﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AgileDashboard.Entities;
using tfs = Microsoft.TeamFoundation.WorkItemTracking.Client;
using AutoMapper;

namespace AgileDashboard.Data.Converters
{
    public class ConverterHelpers
    {




        internal static TfsQuery ConvertQuery(tfs.QueryDefinition query)
        {

            Mapper.CreateMap<tfs.QueryDefinition, TfsQuery>();
            TfsQuery myQuery = Mapper.Map<tfs.QueryDefinition, TfsQuery>(query);

            return myQuery;
        }


        internal static TfsProject ConvertProject(tfs.Project proj)
        {

            Mapper.CreateMap<tfs.Project, TfsProject>();
            TfsProject myProj = Mapper.Map<tfs.Project, TfsProject>(proj);

            return myProj;
        }



    }
}
